﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="TemplateList.aspx.cs" Inherits="Manage_Cms_TemplateList" %>
<html>
<head>
    <!--#include file="../js/html_head.inc"-->
    <link rel="stylesheet" type="text/css" href="../Themes/<%=ManageHelper.GetTheme()%>/style.css" />
</head>
<body>
    <%=ManageHelper.PageSucMsg()!=""?"<div class='msg_succeed'>"+ManageHelper.PageSucMsg()+"</div>":""%>
    <%=ManageHelper.PageErrMsg()!=""?"<div class='msg_failed'>"+ManageHelper.PageErrMsg()+"</div>":""%>
    <table width="95%" align="center">
        <tr>
            <td align="right">
                <table cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td>
                            <input type="submit" name="AddGroup" value="添加模板" onclick="ymPrompt.win('TemplateItem.aspx',450,260,'添加模板',null,null,null,true);"
                                id="AddGroup" class="button" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div class="column">
        <div class="columntitle">
            模板管理</div>
        <table cellspacing="0" cellpadding="0" rules="all" align="center" border="0" id="MyDataGrid"
            style="border-width: 0px; width: 100%; border-collapse: collapse;">
            <tr class="summary-title" style="height: 25px" align="left">
                <td style="width: 50px;" align="center">编号</td>
                <td>模板名称</td>
                <td style="width: 100px;">文件夹</td>
                <td style="width: 50px;" align="center">站点数</td>
                <td style="width: 50px;" align="center">状态</td>
                <td style="width: 80px;" align="center">创建时间</td>
                <td style="width: 180px;" align="center">操作</td>
            </tr>
            <%
                int intID = 0;
                foreach (KeRui.Model.CmsTemplate model in list)
                {
                    intID++;
            %>
            <tr class="tdbg" onmouseover="this.className='tdbg-dark';" onmouseout="this.className='tdbg';" style="height: 25px;" align="left">
                <td align="center"><%=intID%></td>
                <td><%=model.TemplateName%> <%=IsCurSite(model.TemplateFolder) ? "<span style='color:red'><-当前站点正在使用此模板</span>" : ""%></td>
                <td><%=model.TemplateFolder%></td>
                <td align="center"><%=model.SiteNum%></td>
                <td align="center"><%=model.IsUsing==1?"可用":"锁定"%></td>
                <td align="center"><%=model.CreateTime.ToShortDateString()%></td>
                <td align="center">
                <a href='TemplateFileList.aspx?TemplateID=<%=model.TemplateID%>'><span style='color:Maroon'>模板详情</span></a> |
                
                <a href="javascript:ymPrompt.win('TemplateItem.aspx?id=<%=model.TemplateID %>&act=edit',450,260,'修改模板',null,null,null,true);"> 修改</a> | 
                <a href='TemplateItem.aspx?id=<%=model.TemplateID %>&act=del'onclick="javascript:return confirm('此操作将会模“<%=model.TemplateName %>”，确认吗？');">删除</a> | 

                 <%=!IsCurSite(model.TemplateFolder) ? "<a href='TemplateList.aspx?id=" + model.TemplateID + "&act=use'><span style='color:Maroon'>使用</span></a>" : "<s>使用</s>"%></td>
            </tr>
            <%
                }
            %>
        </table>
    </div>
</body>
</html>
